<?php

function greengar_add_notification($notification) {

    $senderid = $notification[ABSTRACT_NOTIFICATION_SENDER_ID];
    $receiverid = $notification[ABSTRACT_NOTIFICATION_RECEIVER_ID];
    $refererid = $notification[ABSTRACT_NOTIFICATION_REFERER_ID];
    $type = $notification[ABSTRACT_NOTIFICATION_TYPE];
    $response = $notification[ABSTRACT_NOTIFICATION_RESPONSE];
    $client_id = $notification[ABSTRACT_NOTIFICATION_CLIENT_ID];
    $notificationEntity = new FriendNotification();

    $notificationEntity->saveNotification($senderid, $receiverid, $refererid, $type, $response, $client_id);
    
    return $notificationEntity;
}

?>